package com.fire.chat.entity.bo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @program: hxzq
 * @description: 菜单资源业务对象
 * @author: xjr
 * @create: 2020-11-04 17:21
 **/
@Data
@NoArgsConstructor
@ApiModel("菜单资源业务对象")
public class SysMenuBO implements Serializable {


    @ApiModelProperty("菜单ID")
    private Long id;

    @ApiModelProperty("菜单编码,存在父节点时以冒号连接,鉴权根据此")
    @NotNull(message = "菜单编码不得为空")
    private String menuCode;

    @ApiModelProperty("父节点ID")
    @NotNull(message = "父节点不得为空")
    @Min(value = -1,message = "父节点只能为-1及以上")
    private Long pid;

    @ApiModelProperty("资源名")
    @NotEmpty(message = "资源名不得为空")
    private String name;

    @ApiModelProperty("图标")
    private String icon;

    @ApiModelProperty(value = "资源类型 1:文件夹 2:页面 3：按钮")
    @NotNull(message = "资源节点类型不得为空")
    private Integer nodeType;

    @ApiModelProperty(value = "节点水平 1:根节点 23456以此类推")
    @Min(value = 1,message = "节点水平最低为1")
    private Integer level;

    @ApiModelProperty(value = "逻辑删除字段 1：已删除 0：未删除",example = "0")
    private Integer isDelete;


}
